package com.quwan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author quan
 * @date 2021-08-02 18:48
 */


@Data
@Accessors(chain = true)
@TableName(value = "t_member_balance_log")
public class TMemberBalanceLog {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("会员id")
    @TableField(value = "m_id")
    private Long mId;

    /**
     * 订单号
     */
    @ApiModelProperty("订单号")
    @TableField(value = "trade_no")
    private String tradeNo;

    /**
     * 0消费 1充值 2提现 4订单取消退回  4完成订单
     */
    @ApiModelProperty(" 0消费 1充值 2提现 3订单取消退回 4完成订单")
    @TableField(value = "trade_type")
    private Integer tradeType;

    @ApiModelProperty("手续费")
    @TableField(value = "fee")
    private BigDecimal fee;

    @ApiModelProperty("手续费占比")
    @TableField(value = "fee_scale")
    private String feeScale;

    @ApiModelProperty("交易前余额")
    @TableField(value = "before_m")
    private BigDecimal beforeM;

    @ApiModelProperty("交易金额")
    @TableField(value = "money")
    private BigDecimal money;

    @ApiModelProperty("余额")
    @TableField(value = "balance")
    private BigDecimal balance;

    /**
     * 0系统 1微信 2支付宝
     */
    @ApiModelProperty("0系统 1微信 2支付宝")
    @TableField(value = "method")
    private Integer method;

    /**
     * 0无效 1有效
     */
    @ApiModelProperty("0无效 1有效")
    @TableField(value = "status")
    private Integer status;

    /**
     * 1在线支付
     */
    @TableField(value = "recharge_type")
    private Integer rechargeType;

    @TableField(value = "pre_pay_id")
    private String prePayId;

    @TableField(value = "transaction_id")
    private String transactionId;

    @ApiModelProperty("描述")
    @TableField(value = "tips")
    private String tips;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "pay_time")
    private LocalDateTime payTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "add_time")
    private LocalDateTime addTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "end_time")
    private LocalDateTime endTime;




    @JsonFormat(pattern = "HH:mm")
    @TableField(exist = false)
    private LocalTime shortTime;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private LocalDate dateTime;

    @TableField(exist = false)
    private String strMoney;

    @TableField(exist = false)
    private String imgUrl;

    @TableField(exist = false)
    private String name;
}